#ifndef __PVMOSDEP_H__
#define __PVMOSDEP_H__

#include "pvm/pvmdefs.h"
#include "pvm/pvmtypes.h"

#include <stdlib.h>
#include <memory.h>
#include <stdio.h>
#include <s3eThread.h>
#include <wchar.h>
#include <iwdebug.h>

//#undef PVM_USE_SPINLOCK_AS_CRITICAL

#ifndef PVM_USE_SPINLOCK_AS_CRITICAL
typedef s3eThreadLock* PVMCriticalSection;
#else
#include "lib/sys/common/pvmspinlock.h"

struct PVMCriticalSection
{
	PVMSpinLock	lock;
	void*		marker;
};
#endif

typedef s3eThread* PVMThreadHandle;
typedef int PVMEventHandle;

typedef void* PVMThreadRetVal;
typedef PVMThreadRetVal (PVMCALL *PVMThreadStartRoutine)(void* param);
typedef FILE* PVMFileHandle;


#define PVM_FILE_OPEN_ERROR	NULL 
#define PVM_EMPTY_FILE_HANDLE	NULL

#endif
